﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.ywxt.Project
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.ywxt;

    public class RefProjectAndPlan_Map : ClassMapping<DB_Model.ywxt.Project.RefProjectAndPlan>
    {
        public RefProjectAndPlan_Map()
        {
            //映射ID
            Id(x => x.r_id, map => { 
                map.Length(40);
            });

            Property(x => x.is_valid, map =>
            {
                
            });
            Property(x => x.create_date, map =>
            {
                
            });

            //
            ManyToOne(x => x.Plan, map =>
            {
                map.Column("p_id");
            });

            //
            ManyToOne(x => x.Project, map =>
            {
                map.Column("proj_id");
            });

            Table("r_project_plan");

            //不进行创建
            //SchemaAction(NHibernate.Mapping.ByCode.SchemaAction.None);
        }
    }
}
